package com.example.mybaties.testone.aop.advice;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.aop.AfterReturningAdvice;

import java.lang.reflect.Method;

/**
 * 后置增强
 */
public class GreetingAfterReturnAdvice implements AfterReturningAdvice {

    private Logger logger = LogManager.getLogger(this.getClass());

    @Override
    public void afterReturning(Object returnObj, Method method, Object[] args, Object obj) throws Throwable {
        String str = (String) args[0];
        logger.debug("GreetingAfterReturnAdvice.........afterReturning......." + str);
    }

}
